Skip to content

Instantly share code, notes, and snippets.

@hawkapparel
hawkapparel / sql_departamentos_provincia_distrito_peru.sql
Last active May 14, 2024 17:57
Departamentos, distritos y provincias de peru en SQL
DROP TABLE IF EXISTS departamento;
CREATE TABLE departamento(
id_departamento varchar(2) NOT NULL,
descripcion varchar(30)
);
INSERT INTO departamento (id_departamento, descripcion) VALUES('01', 'Amazonas');
INSERT INTO departamento (id_departamento, descripcion) VALUES('02', 'Áncash');
INSERT INTO departamento (id_departamento, descripcion) VALUES('03', 'Apurímac');
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
// Função para classificar o nível do herói
function classificaNivel(nome, experiencia) {
let nivel;
if (experiencia < 1000) {
nivel = "Ferro";
} else if (experiencia < 2000) {
nivel = "Bronze";
} else if (experiencia < 5000) {
nivel = "Prata";
@przbadu
przbadu / Ctags.md
Last active May 14, 2024 17:53
Ctags for ruby on rails and node applications

Install ctags

http://ctags.sourceforge.net follow this url for installation and documentation.

Ctags with Ruby/Rails

We can ctags lots of programming languages. Here is how to do it for ruby/rails. I really like how RubyMine jumps to the source code (either withing project score or to the gem source). This is really useful for reading source code for those classes, methods, modules etc. But Now that I use vim as My IDE/Editor I really like that functionality to happen in my vim editor. And I found ctags as the solution.

@slimlime
slimlime / uupdump ConvertConfig.ini explained.md
Created October 8, 2022 22:45
uupdump ConvertConfig.ini explained (convert-UUP, AutoStart, AddUpdates, Cleanup, ResetBase, NetFx3, StartVirtual, wim2esd, wim2swm, SkipISO, SkipWinRE, LCUwinre, UpdtBootFiles, ForceDism, RefESD, SkipEdge, AutoExit, Store_Apps, SkipApps, AppsLevel, CustomList, create_virtual_editions, vAutoStart, vDeleteSource, vPreserve, vwim2esd, vwim2swm, vS…

note: some of the information is posted in comments,
if you'll fork this gist, you'll loose that information,
it is best to just bookmark this one..

WIM

WIM (ESD,SWM) is an image of an OS file system,
it can be mounted, and modified (to some degree) .
there are two possible ways, through DISM or through mounting it directly through an older way, using a driver named imagex (Windows Imaging Utility).
regardless,

terminology

@ixahmedxi
ixahmedxi / init.vim
Created January 2, 2024 20:46
vscode neovim init.vim
" packadd quickscope
" execute 'luafile ' . stdpath('config') . '/lua/settings.lua'
function! s:manageEditorSize(...)
let count = a:1
let to = a:2
for i in range(1, count ? count : 1)
call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize')
endfor
endfunction
sepal.length sepal.width petal.length petal.width variety
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa
@rsms
rsms / macos-distribution.md
Last active May 14, 2024 17:48
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@bdashrad
bdashrad / fizzbuzz.tf
Created May 14, 2024 15:18
a terrible idea
# fizzbuzz.tf
variable "start" {}
variable "end" {}
output "out_text" {
value = join(
"\n", [
for i in range(var.start, var.end):
i % 15 == 0 ? "FizzBuzz" :